﻿

using Bottle.CommunityForum.IBLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Bottle.CommunityForum.Factory
{
    public partial class StaticBLLFactory
    {
        public static string AssemblyBllName = System.Configuration.ConfigurationManager.AppSettings["AssemblyBllName"];

        public static IAttributesInfoService GetCurrentAttributesInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".AttributesInfoService") as IAttributesInfoService;
        }

        public static ICommentsInfoService GetCurrentCommentsInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".CommentsInfoService") as ICommentsInfoService;
        }

        public static IFavoritesInfoService GetCurrentFavoritesInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".FavoritesInfoService") as IFavoritesInfoService;
        }

        public static IMessageInfoService GetCurrentMessageInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".MessageInfoService") as IMessageInfoService;
        }

        public static INodesInfoService GetCurrentNodesInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".NodesInfoService") as INodesInfoService;
        }

        public static IPageInfoService GetCurrentPageInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".PageInfoService") as IPageInfoService;
        }

        public static IRoleInfoService GetCurrentRoleInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".RoleInfoService") as IRoleInfoService;
        }

        public static ISettingsInfoService GetCurrentSettingsInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".SettingsInfoService") as ISettingsInfoService;
        }

        public static ISettingsTypeInfoService GetCurrentSettingsTypeInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".SettingsTypeInfoService") as ISettingsTypeInfoService;
        }

        public static ITagsInfoService GetCurrentTagsInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".TagsInfoService") as ITagsInfoService;
        }

        public static ITopicsAttrInfoService GetCurrentTopicsAttrInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".TopicsAttrInfoService") as ITopicsAttrInfoService;
        }

        public static ITopicsInfoService GetCurrentTopicsInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".TopicsInfoService") as ITopicsInfoService;
        }

        public static IUserAttrInfoService GetCurrentUserAttrInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".UserAttrInfoService") as IUserAttrInfoService;
        }

        public static IUserInfoService GetCurrentUserInfoService()
        {
            return Assembly.Load(AssemblyBllName).CreateInstance(AssemblyBllName + ".UserInfoService") as IUserInfoService;
        }
    }
}